using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;

public class AnimPropeller : MonoBehaviour
{
    private Propeller propeller;
    public Ray ray;
    private float speed;
    private void Start()
    {
        propeller=GetComponentInParent<Propeller>();
        ray = new Ray();
    }
    private void Update()
    {
        speed = propeller.force_val * Time.deltaTime * 1000;
        this.transform.Rotate(0,speed, 0);
        ray.origin = transform.position;
        ray.direction = transform.up*-1;
        Debug.DrawRay(ray.origin, ray.direction * 1, Color.red);
    }
}
